package com.base.admin.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.base.admin.constant.PatternConstant;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

import java.util.Date;

/**
 * @author rqq
 */
@Data
public class BaseEntity {

    /**
     * 用户id
     */
    @TableId(type = IdType.AUTO)
    protected Long id;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = PatternConstant.DATE_TIME_PATTERN_BASE)
    protected Date createTime;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = PatternConstant.DATE_TIME_PATTERN_BASE)
    protected Date updateTime;

    /**
     * 逻辑删除,0正常,1删除
     */
    @TableLogic
    @JsonIgnore
    protected Integer deleted;

}
